
import Qt 4.7


Rectangle {
    id: window
    color: "#3E606F"
    width: 600
    height: 1000

    XmlListModel {
	id: xmlModel
	source: "http://manu42.local:8084/LocalModel/findFiles.jsp?dir=/home/emugwaneza/Vidéos&filter=.avi"
	query: "/fichiers/fic"
	XmlRole { name: "name"; query: "name/string()" }
	XmlRole { name: "isDir"; query: "isDir/string()" }
	XmlRole { name: "sPath"; query: "exactPath/string()" }
    }

    ListView {
	    id: list1
	    anchors.horizontalCenter: parent.horizontalCenter
	    anchors.fill: parent
	    focus: true
            model:xmlModel
	    delegate: ListViewDelegate {}
	    spacing:20
	    
	    
	    Keys.onPressed: {
		if (event.key == Qt.Key_Return) {
		    console.log("selected ############:"  + currentIndex );
		    event.accepted = true;
		}
	    }
	}


        
   
        
}
